package com.zh.web.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import lombok.Getter;

@Getter
@ApiModel("排序枚举")
public enum OrderBy {
    PRAISE("praise", "点赞量"),
    TIME("create_time", "回复时间");
    @EnumValue
    @JsonValue
    private final String field;
    private final String desc;

    OrderBy(String field, String desc) {
        this.field = field;
        this.desc = desc;
    }
}
